package com.yunao.commons.serachcore.core.query;

import com.yunao.commons.serachcore.core.help.*;

public interface QueryBuilder {

	public static QueryBuilder create() {
		return new QueryBuilderImpl();
	}
	
	QueryBuilder mode(Mode mode);

	QueryBuilder keywords(String keywords);
	
	QueryBuilder title(String title);

	QueryBuilder timeGreaterThanOrEqualTo30Days();

	QueryBuilder timeGreaterThanOrEqualTo7Days();
	
	QueryBuilder timeGreaterThanOrEqualTo3Days();

	QueryBuilder timeGreaterThanOrEqualTo1Days();
	
	QueryBuilder timeGreaterThanOrEqualTo(long time);

	QueryBuilder timeGreaterThanOrEqualTo(int days);

	QueryBuilder timeGreaterThanOrEqualTo(String date);

	QueryBuilder timeGreaterThan(long time);

	QueryBuilder timeGreaterThan(int days);

	QueryBuilder timeGreaterThan(String date);

	QueryBuilder timeBetween(String beginDate, String endDate);

	QueryBuilder timeBetween(long beginTime, long endTime);

	QueryBuilder offset(int offset);

	QueryBuilder limit(int limit);

	QueryBuilder group(GroupField group);

	QueryBuilder cube(GroupField cube1, GroupField cube2);

	QueryBuilder miningField(String field);
	
	QueryBuilder wordcloud(int maxWord);

	QueryBuilder wordrelation(String... stopWords);

	QueryBuilder wordrelation(int maxWord, String... stopWords);

	QueryBuilder cluster(double distance, int maxGroup);

	QueryBuilder id(long... ids);

	QueryBuilder trimArticle();

	QueryBuilder nonTrimArticle();

	QueryBuilder sort(Sort sort);

	QueryBuilder author(String... authors);

	QueryBuilder domain(String... domains);

	QueryBuilder host(String... hosts);

	QueryBuilder source(String... sources);

	QueryBuilder mediaType(MediaType... mediaTypes);
	
	QueryBuilder mediaType(String... mediaTypes);

	QueryBuilder channel(Channel... channels);
	
	QueryBuilder channel(String... channels);

	QueryBuilder emotion(Emotion... emotions);
	
	QueryBuilder emotion(String... emotions);

	QueryBuilder domainLevel(DomainLevel... domainLevels);
	
	QueryBuilder domainLevel(String... domainLevels);

	QueryBuilder messageType(MessageType... messageTypes);
	
	QueryBuilder messageType(String... messageTypes);

	QueryBuilder location(String... locations);

	QueryBuilder isDomestic();

	QueryBuilder isOverseas();

	QueryBuilder nr(String... nr);

	QueryBuilder ns(String... ns);

	QueryBuilder nt(String... nt);

	Query build();

}
